<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class category_model extends CI_Model {

	public function new_category($input)
	{
		$this->db->insert('category',$input);
	}

	public function get_category()
	{
		$query = $this->db->get('category');
		return $query->result_array();
	}

	public function update_category($input)
	{
		$this->db->where('category_id',$input['category_id']);
		$this->db->update('category',$input);
	}

	public function delete_category($category_id)
	{
		$this->db->where('category_id',$category_id);
		$this->db->delete('category');
	}

}